//
// Created by Tony on 2024/1/14.
//

#ifndef FILE_READER_FILE_UTIL_H
#define FILE_READER_FILE_UTIL_H

#include "../common/ErrorRecorder.h"
#include "BinaryFile.h"
#include "SourceFile.h"
#include <memory>

class FileUtil : public ErrorRecorder {
    static constexpr int BUFFER_SIZE = 1000;

public:
    std::shared_ptr<SourceFile> readSourceFile(const std::string& fileName);
    static std::shared_ptr<BinaryFile> readBinaryFile(const std::string& filePath);

    static void printSourceFile(const std::shared_ptr<SourceFile>& source);
};

#endif // FILE_READER_FILE_UTIL_H
